updating oE append_lines
append_lines
include io.e namespace io public function append_lines(sequence file, sequence lines)
appends a sequence of lines to a file.
Parameters:
- file : an object, either a file path or the handle to an open file.
- lines : the sequence of lines to write
Returns:
An integer, 1 on success, -1 on failure.
Errors:
If puts cannot write some line of text, a runtime error will occur.
Comments:
file is opened, written to and then closed.
Example 1:
if append_lines("data.txt", {"This is important data", "Goodbye"}) != -1 then puts(STDERR, "Failed to append data\n") end if
See Also:
Not Categorized, Please Help
|